package com.yanfan.community.building.mapper;

import com.yanfan.community.building.domain.CommunityBuilding;

import java.util.List;

/**
 * 建筑Mapper接口
 *
 * @author li
 * @date 2025-07-03
 */
public interface CommunityBuildingMapper {
    /**
     * 查询建筑
     *
     * @param buildingId 建筑主键
     * @return 建筑
     */
    public CommunityBuilding selectSysBuildingByBuildingId(Long buildingId);

    /**
     * 查询建筑列表
     *
     * @param communityBuilding 建筑
     * @return 建筑集合
     */
    public List<CommunityBuilding> selectSysBuildingList(CommunityBuilding communityBuilding);

    /**
     * 新增建筑
     *
     * @param communityBuilding 建筑
     * @return 结果
     */
    public int insertSysBuilding(CommunityBuilding communityBuilding);

    /**
     * 修改建筑
     *
     * @param communityBuilding 建筑
     * @return 结果
     */
    public int updateSysBuilding(CommunityBuilding communityBuilding);

    /**
     * 删除建筑
     *
     * @param buildingId 建筑主键
     * @return 结果
     */
    public int deleteSysBuildingByBuildingId(Long buildingId);

    /**
     * 批量删除建筑
     *
     * @param buildingIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSysBuildingByBuildingIds(Long[] buildingIds);

    List<CommunityBuilding> selectSysBuildingListByParentId(Long buildingId);

    List<CommunityBuilding> selectChildBuildingListWithOwnerByParentId(Long buildingId);
}
